package com.test.springbootdemo.args;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.stereotype.Component;

import java.util.List;

//@Component
public class MyBean {

    @Autowired
    public MyBean(ApplicationArguments arguments) {
        List<String> files = arguments.getNonOptionArgs();
        for (String s : files){
            System.out.println("arg: "+s);
        }
    }
}
